<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$return['account']=pdo_get('core_accounts',array('uniacid'=>$_SESSION['uniacid']));
$return['account']['navs']=json_decode($return['account']['navs'],true);
$return['extradata']=array();
if($_RQ['op']=='main'){
	set_html('header','common/header-cms');
	set_html('title','给我们留言');
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	if(empty($post['username']) || empty($post['content'])){
		$return['message'] = '必须填写姓名和内容！';
	}
	$data=array(
		'content'=>trim($post['content']),
		'userphone'=>trim($post['phone']),
		'username'=>trim($post['name']),
		'useremail'=>trim($post['email']),
		'uniacid'=>$_SESSION['uniacid'],
	);
	$data['createtime']=TIMESTAMP;
	pdo_insert('core_account_message',$data);
	$return['success']=1;
	exi($return);
}
?>